package com.fcml.pattern.responsibility;

/**
 * @author fcml
 * @date 2018/11/9
 *
 * 抽象的处理类
 */
public abstract class AbstractHandler {

    /*持有责任链上下一个处理对象*/
    protected AbstractHandler nextHandler;

    public AbstractHandler getNextHandler() {
        return nextHandler;
    }

    /**
     * 设置下一处理请求的对象
     * @param nextHandler
     */
    public void setNextHandler(AbstractHandler nextHandler) {
        this.nextHandler = nextHandler;
    }

    /**
     * 处理方法
     * @param staff 员工
     * @param holiday 请假天数
     */
    public abstract void handler(String staff, int holiday);
}
